/*
 * This file is part of Advanced ABX
 *
 * Copyright 2010 Christian Uebber
 *
 * Advanced ABX is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2, as
 * published by the Free Software Foundation.
 *
 * Advanced ABX is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Advanced ABX.  If not, see <http://www.gnu.org/licenses/>.
 */

/*
 * Transitioner.java
 *
 *  This file is part of the NilPop package.
 */

package de.uebber.sound.lib;

import javax.sound.sampled.AudioFormat;

/**
 * Instances of <code>Transitioner</code> are able to create a transition between two sequences
 * of samples contained in two byte arrays, described by an <code>AudioFormat</code> object.
 */
public interface Transitioner {
    /**
     * The function reads two sample sequences from <code>active</code> and
     * <code>next</code> and writes the result into <code>result</code>
     *
     * @param active     Currently active stream.
     * @param next       Stream to switch/transition to.
     * @param srcOffset  Position of the first byte to read.
     * @param result     Array to write the transition to.
     * @param dstOffset  Position of the first byte to write.
     * @param frameCount Transition length in samples.
     * @param format     Stream description.
     */
    public void process(byte[] active, byte[] next, int srcOffset, byte[] result, int dstOffset,
                        int frameCount, AudioFormat format);

    public String getName();

    public String getParameters();
}
